package com.crm.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.crm.domain.Contract;
import com.crm.crm.domain.vo.CountShipVo;
import com.crm.crm.domain.vo.SubjectCountVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;

@SuppressWarnings("MybatisXMapperMethodInspection")
@Mapper
public interface ContractMapper extends BaseMapper<Contract> {
    // 统计客户选择各个学科的数量
    List<SubjectCountVo> countProject(String beginCreateTime, String endCreateTime);

    //统计客户的来源渠道
    @SuppressWarnings("MybatisXMapperMethodInspection")
    List<Map<Integer, String>> CountChannel(String beginCreateTime, String endCreateTime);

    //统计客户来源的活动
    @SuppressWarnings("MybatisXMapperMethodInspection")
    List<Map<String, Integer>> CountActivitystics(String beginCreateTime, String endCreateTime);

    //  销售统计  统计所属人的分页查询
    List<CountShipVo> countOwner(@Param("beginCreateTime") String beginCreateTime,
                                 @Param("endCreateTime") String endCreateTime);

    //  销售统计  统计部门的分页查询
    List<CountShipVo> countDept(String beginCreateTime, String endCreateTime);

    //  销售统计  统计渠道的分页查询
    List<CountShipVo> countChannel(String beginCreateTime, String endCreateTime);

    //统计每日销售金额
    List<Map<String, Object>> salesAmountByDate(String beginCreateTime, String endCreateTime);
}
